import { createApp } from 'vue'
import App from './App.vue'
import piniaPersist from 'pinia-plugin-persist'
// 重置样式，让html标签在浏览器中有相同的标签
import 'normalize.css'

// 公共样式
import '@/assets/styles/common.less'

// 路由
import router from './router'

import {createPinia} from 'pinia'


const app = createApp(App)
// v3全局组件
// import XtxSkeleton from '@/components/XtxSkeleton/XtxSkeleton.vue'
// app.component('XtxSkeleton', XtxSkeleton)

import XtxUI from '@/components/index'
import XtxDirectives from '@/directives/index'
// 自动调用 install函数，并传入app
app.use(XtxUI)
// 自定义指令
app.use(XtxDirectives)

const pinia = createPinia()
pinia.use(piniaPersist)
app.use(pinia).use(router).mount('#app')
